var Common = {
		//EasyUI用DataGrid用日期格式化
	    DateFormatter: function (value) {
	    	if(value){
	    		
	    		var date = new Date(value.time) ;
	    		return date.getFullYear()+"-"+(date.getMonth()+1)+"-"+date.getDate() ;
	    	}else{
	    		return "" ;
	    	}
	    },
		DateFormatter2: function (time) {
			var date = new Date(time) ;
			return date.getFullYear()+"-"+(date.getMonth()+1)+"-"+date.getDate() ;
		}
	    ,
		DateFormatterFullTime: function (value) {
			if(value){
				
				var date = new Date(value.time) ;
				return date.getFullYear()+"-"+(date.getMonth()+1)+"-"+date.getDate()+" "+date.getHours()+":"+date.getMinutes()+":"+date.getSeconds() ;
			}else{
				return "";
			}
		},
		DateFormatterTime: function (value) {
			if(value){
				
				var date = new Date(value) ;
				return date.getFullYear()+"-"+(date.getMonth()+1)+"-"+date.getDate()+" "+date.getHours()+":"+date.getMinutes()+":"+date.getSeconds() ;
			}else{
				return "";
			}
		},
		DateSorter:function(date1,date2){
			return date1.time-date2.time;
		},
		strToDate:function(str){
			var date = new Date(str) ;
			return date.getFullYear()+"-"+(date.getMonth()+1)+"-"+date.getDate() ;
		}, 
		isLinkAddr:function(str){
			 return /http({s}{0,1}):\/\/\w+/.test(str);
		}
} 